package _4;

public class Person {
    public static void main(String[] args) {
        Manager m = new Manager("Tom", "Coffee Shop", 2000);
        m.getDetails();
    }
}
class Employee{
    protected String name;
    protected String department;
    public Employee(String name, String department){
        this.name = name;
        this.department = department;
    }
    public void getDetails(){
        System.out.println("Name: " + this.name);
        System.out.println("Department: " + this.department);
    }
}
class Manager extends Employee{
    private int salary;

    public Manager(String name, String department, int salary) {
        super(name, department);
        this.salary = salary;
    }

    @Override
    public void getDetails() {
        System.out.println("Name: " + this.name);
        System.out.println("Salary: " + this.salary);
        System.out.println("Department: " + this.department);
    }
}
